<?php
class ORMFile extends ORMBase {
  public function __construct() {
    parent::__construct('File');
  }

  public function __toEpObject($myManager, $epObject, $object) {
    $epObject->trackId = isset($object->trackId) ? $object->trackId : '';
    $epObject->customerTrackId = isset($object->customerTrackId) ? $object->customerTrackId : '';
    $epObject->parentDirId = isset($object->parentDirId) ? $object->parentDirId : '';
    $epObject->dirId = isset($object->dirId) ? $object->dirId : '';
    $epObject->name = isset($object->name) ? $object->name : '';
    $epObject->trueName = isset($object->trueName) ? $object->trueName : '';
    $epObject->link = isset($object->link) ? $object->link : '';
    $epObject->size = isset($object->size) ? $object->size : 0;
    $epObject->downloaded = isset($object->downloaded) ? $object->downloaded : 0;
    $epObject->comment = isset($object->comment) ? $object->comment : '';
    return $epObject;
  }

  public function __toObject($myManager, $epObject, $object) {
    $object->id = $epObject->oid;
    $object->trackId = $epObject->trackId;
    $object->customerTrackId = $epObject->customerTrackId;
    $object->parentDirId = $epObject->parentDirId;
    $object->dirId = $epObject->dirId;
    $object->name = $epObject->name;
    $object->trueName = $epObject->trueName;
    $object->link = $epObject->link;
    $object->size = $epObject->size;
    $object->downloaded = $epObject->downloaded;
    $object->comment = $epObject->comment;
    return $object;
  }
}
?>
